* {
    margin: 0;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    font-family: "Poppins", sans=-serif;
}

.wrapper {
    background: #fff;
    padding: 22px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.wrapper .input-data {
    height: 40px;
    width: 100%;
}

.wrapper .input-data input {
    height: 100%;
    width: 100%;
    border: none;
    font-size: 17px;
    border-bottom: 2px solid silver;
}

.input-data input:focus~p,
.input-data input:valid~p {
    transform: translateY(-20px);
    font-size: 15px;
    color: #4158d0;
}

.wrapper .input-data p {
    position: absolute;
    bottom: 10px;
    left: 0;
    color: grey;
    pointer-events: none;
    transition: all 0.3s ease;
}

.wrapper .input-data .underline {
    position: absolute;
    bottom: 0px;
    height: 2px;
    width: 100%;
}

.input-data .underline:before {
    position: absolute;
    content: "";
    height: 100%;
    width: 100%;
    background: #4158d0;
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.input-data input:focus~.underline:before,
.input-data input:valid~.underline:before {
    transform: scaleX(1);
}